Some microelectronic devices containing a component with a piezoelectric element are fabricated by forming an etch mask on the layer of piezoelectric material and etching the piezoelectric material to define the piezoelectric element. Etching the piezoelectric material is problematic. Dry etching the piezoelectric material is difficult for layers over a micron thick due to etch residue buildup and mask erosion. Wet etching the piezoelectric material undesirably undercuts the mask in an uncontrollable manner and lifts the mask from the piezoelectric material, producing undesired profiles in the piezoelectric element.